/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Action;

/**
 *
 * @author insane
 */
public class Event {

    private static Event instance;

    public static Event getInstance() {
        if (instance == null) {
            instance = new Event();
        }
        return instance;
    }

    private Event() {
    }

    public void openDoor(char[][] map, int x, int y) {
        for (int w = x - 1; w <= x + 1; w++) {
            for (int h = y - 1; h <= y + 1; h++) {
                if (map[w][h] == '+') {
                    map[w][h] = '.';
                }
                if (map[w][h] == '*') {
                    map[w][h] = openChest(map, x, y);
                }
            }
        }
    }

    public char openChest(char[][] map, int x, int y) {
        // getItem
        // addItems
        return '.';
    }
}
